<!--
* @author wangpeizhi
-->
<template>
  <section class="data-center">
    <component :is="who" v-if="isshow" />
    <section class="box">
      <img src="./../images/welcome-bak.png">
    </section>
  </section>
</template>

<script>
import { mapGetters } from 'vuex'
// import { homePage } from './homePage'
import { Statistics } from './views'
export default {
  name: 'DataCenter',
  components: {
    Statistics
  },
  data() {
    return {
      who: 'Statistics',
      isshow: false,
      isSpecial: false
    }
  },
  computed: {
    ...mapGetters(['user'])
  },
  mounted() {
    console.log('---测试项目环境----')
    // const u = this.user.roleId
    // let flag = false
    // if (this.user.departmentUserList[0].orgId != '1') {
    //   this.who = 'Base'
    //   flag = true
    // }
    // if (!flag) {
    //   if (u === 'JG') {
    //     this.who = 'Jg'
    //   } else if (u === 'FG') {
    //     this.who = 'Fg'
    //   } else if (u === 'WQ') {
    //     this.who = 'Wq'
    //   } else if (u === 'JJ') {
    //     this.who = 'Jj'
    //   } else if (u === 'ZZ') {
    //     this.who = 'Zz'
    //   } else if (u === 'NG') {
    //     this.who = 'Ng'
    //   } else if (u === 'XC') {
    //     this.who = 'Xc'
    //   } else if (u === 'CM') {
    //     this.who = 'Base'
    //   } else if (u === 'BZ') {
    //     this.who = 'Bz'
    //   } else if (u === 'JC') {
    //     this.who = 'Jc'
    //   } else {
    //     this.who = 'Base'
    //   }
    // }
  }
  /* beforeRouteEnter(to, from, next) {
    next(vm => {
      if (vm.user.menuDatas.findIndex(item => { return item.code === 'datacenter' }) === -1) {
        vm.isshow = false
      } else {
        vm.isshow = true
      }
    })
  }*/
}
</script>

<style scoped lang="scss">
.h1_tit{
font-size: 34px;
font-weight: bold;
text-align: left;
color: #489bff;
line-height: 50px;
margin-top: 100px;
}
.h2_tit{
font-size: 24px;
font-weight: bold;
text-align: left;
color: #666666;
}
.data-center {
  background-color: #fff;
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  justify-content: space-around;
  .box{
    display: flex;
    align-items: center;
    img{
      width: 500px;
      height: 500px;
    }
  }
}
.ishome {
  background: #f3f3f5;
}
</style>
